import Vue from 'vue';
import Vuex from 'vuex';

import app from './modules/app';
import user from './modules/user';

Vue.use(Vuex);

const store = new Vuex.Store({
    state: {
        login: false,
        auditorStatus: '',
        rank: '',
        pageSize: 10
    },
    mutations: {
        increment () {
            this.state.login = true;
        },
        saveIdentity (state, {stats, dj, pg}) {
            state.auditorStatus = stats;
            state.rank = dj;
            state.pageSize = pg;
        },
        increments () {
            this.state.login = false;
        }
    },
    actions: {

    },
    modules: {
        app,
        user
    }
});

export default store;
